package main

import (
	"encoding/json"
	"fmt"
)


func main(){
	//定义一个 key 是 string 的map
	var a map[string]interface{}
	a = make(map[string]interface{})
	a["name"] = "红孩儿"
	a["age"] = 30
	a["address"] = "火云洞"
	data,err := json.Marshal(a)
	if err != nil {
		fmt.Println(err)
	}
	fmt.Println(string(data))
}